<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <p>
        <!-- 数据的双向绑定（响应） -->
        视图:
        <!-- <input
          @input="username=$event.target.value"
          type="text"
          :value="username"
        /> -->
        <input type="text" v-model="username" />
        <br />
        数据: {{username}}
      </p>
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {
          username: "jack",
        },
        methods: {
          say(e) {
            console.log("hello");
          },
        },
      });
    </script>
  </body>
</html>
